package com.haima.domin;

public class Rectangle {
    private double length;
    private double breadth;

    public Rectangle() {
    }

    public Rectangle(double length, double breadth) {
        this.length = length;
        this.breadth = breadth;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getBreadth() {
        return breadth;
    }

    public void setBreadth(double breadth) {
        this.breadth = breadth;
    }

    public void acreage() {
        System.out.println("面积为: " + (length * breadth));
    }

    public void perimeter() {
        System.out.println("周长为: " + (length * 2 + breadth * 2));
    }
}
